This invention relates to comparator circuits, and more particularly to voltage-to-current converters.
Semiconductor chips such as complementary metal-oxide-semiconductor (CMOS) integrated circuits (IC's) sometimes perform voltage-sensing. An input voltage from some source is sensed to generate an output voltage. A voltage comparator is often used to sense the input voltage. The voltage comparator compares the input voltage to a reference voltage and generates the output voltage in a high state when the high state when the input voltage is higher than the reference voltage, and generates the output voltage in a low state when the high state when the input voltage is less than the reference voltage.
FIG. 1 shows a typical voltage-sensing circuit with a source follower and an operational amplifier. Input source 10 is an internal or external voltage source that generates voltage Vp which is applied to the gate of n-channel transistor 14. Input voltage Vin is generated from voltage Vp using a voltage source follower that includes n-channel transistor 14 and resistor 12 in series.
N-channel transistor 14 and resistor 12 in series form a source follower between the positive voltage supply Vdd and ground. Operational amplifier or comparator 16 is configured as a non-inverting comparator. Reference voltage Vref is a reference voltage connected to the negative input of comparator 16. Input voltage Vin is connected to the positive (non-inverting) input (+) of comparator 16.
When voltage source 10 is changing from low to high, Vin follows Vp from low to high. As Vin rises to a voltage potential greater than Vref, the output Vo of comparator 16 switches from a low voltage to a high voltage. When Vin drops below the reference voltage Vref, the output Vo of comparator 16 switches from a high voltage to a low voltage.
In the circuit of FIG. 1, Vin always follows Vp as the input voltage source changes. N-channel transistor 14 acts as a source-follower that level-shifts Vp to generate input voltage Vin. Voltage Vp from input source 10 activates n-channel transistor 14, level-shifting Vin by a the gate-to-source voltage Vgs of at least a threshold Vt to be at a lower voltage than Vp.
The actual threshold voltage value of Vt varies due to changes in operating conditions such as voltage-supply, temperature, and fabrication process. As the voltage shift across n-channel transistor 14 changes with conditions, the cross-over point of Vin and Vref also changes with operating conditions. As a result, the point at which Vp is detected and output Vo switches can vary and is not accurate.
FIG. 2 shows a comparator with a resistor voltage divider. Resistors 24, 22 are in series between voltage Vp and ground, and generate input voltage Vin at their mid-point. When input source 20 causes voltage Vp to change from low to high, Vin follows Vp from low to high. As Vin rises to a potential greater than Vref, the output Vo of comparator 26 switches from a low voltage to a high voltage. When Vin drops below the Vref voltage value, the output Vo of comparator 26 switches from a high voltage to a low voltage.
The resistor voltage divider of resistors 24, 22 act as a voltage level shifter. Resistor voltage dividers are not affected as significantly as transistors by different operating conditions such as changes in temperature, fabrication process, and varying levels of supply voltage Vdd. The circuit of FIG. 2 has an input voltage Vin that more accurately follows changes in Vp. However, such voltage dividers consume power. The current available from input source 20 may be too weak to power a voltage divider so this circuit is not a good solution for some applications.
Comparator output Vo switches polarities when Vin rises or falls past the Vref voltage value. However, this method of sensing input voltages is not accurate due to variables that affect the comparator circuitry, such as process, temperature, supply voltage, and operating frequency. Accuracy may be worse when the input voltage is double or triple the device power supply Vdd. In this case the reference voltage Vref and input voltage Vin do not track each other as accurately, causing output signal Vo to switch polarities at different voltage cross-points.
What is desired is a more accurate voltage sensor. A circuit that more accurately compares an input voltage to a reference voltage is desired.